/*
    created: 2023/4/28
    filename: Main.cpp  
    author: 李东霖
    purpose: 测试
*/

#include"Search.h"
#include<iostream>
using namespace std;

int main()
{
    cout<<"测试开始"<<endl;
    ElemType arr[10] = {1,2,3,4,5,6,7,8,9,10};
    ElemType elem = 10;
    int pos = Search_Binary(arr,10,&elem);
    if(-1 != pos)
    {
        cout<<pos<<endl;
        cout<<arr[pos]<<endl;
    }
    cout<<"next"<<endl;
    elem = 9;
    pos = Search_Binary_R(arr,10,&elem);
    if(-1 != pos)
    {
        cout<<pos<<endl;
        cout<<arr[pos]<<endl;
    }
    return 0;
}